package com.share.shareplatform.sharegoods.service.feign;

import com.share.shareplatform.pojo.User;
import com.share.shareplatform.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.annotation.security.PermitAll;
import java.util.List;

@Component
@FeignClient(value = "share-user")
public interface UserService {
    @GetMapping("/user/all/safe/{ids}")
    public Result findAllSafeByIds(@PathVariable(value = "ids" ,required = false) String ids);

    @GetMapping("/user/safe/{id}")
    public Result findOneSafeById( @PathVariable("id") Long id);

    @GetMapping("/user/{id}")
    public Result findOneById(@PathVariable("id") Long id);

    @GetMapping("/user/map/{ids}")
    public Result findAllSafeByIdsAsMap(@PathVariable("ids") String ids);

    @GetMapping("/user/test/user")
    public Result test(User user);

}
